The current import rule fails in two ways:
- commit
c62e7a6a moved the theme's stylesheet to the builddir
- since commit
49c4ba56, assets are addressed as resource:// URIs
Fix both issues by loading and referencing the theme resource instead
of the stylesheet itself.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"
GNOME_SHELL_JS="$srcdir/../js"
-GNOME_SHELL_DATADIR="$srcdir/../data"
+GNOME_SHELL_DATADIR="$builddir/../data"
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
-@import "../../data/theme/gnome-shell.css";
+@import url("resource:///org/gnome/shell/theme/gnome-shell.css");
stage {
font: 16pt serif;
function init(stage) {
Environment.init();
+ let themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
+ themeResource._register();
+
let context = St.ThemeContext.get_for_stage(stage);
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });